<?php

defined('_JEXEC') or die;

$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$user = JFactory::getUser();
$this->language = $doc->language;
$this->direction = $doc->direction;

$params = $app->getTemplate(true)->params;

$option = $app->input->getCmd('option', '');
$view = $app->input->getCmd('view', '');
$layout = $app->input->getCmd('layout', '');
$task = $app->input->getCmd('task', '');
$itemid = $app->input->getCmd('Itemid', '');
$sitename = $app->get('sitename');

$doc->setHtml5(true);

if ($task == "edit" || $layout == 'form') {
    $fullWidth = 1;
}
else {
    $fullWidth = 0;
}

$doc->addScript($this->baseurl . '/templates/' . $this->template . '/js/bootstrap.min.js');
$doc->addScript($this->baseurl . '/templates/' . $this->template . '/js/jquery.min.js');
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/bootstrap.min.css');
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/bootstrap-theme.min.css');
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/ie10-viewport-bug-workaround.css');
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');

// disable builtin bootstrap2.x
$headData = $doc->getHeadData();
$scripts = $headData['scripts'];
unset($scripts[JUri::root(true) . '/media/jui/js/jquery.min.js']);
unset($scripts[JUri::root(true) . '/media/jui/js/jquery-noconflict.js']);
unset($scripts[JUri::root(true) . '/media/jui/js/jquery-migrate.min.js']);
$headData['scripts'] = $scripts;
$doc->setHeadData($headData);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language ?>" lang="<?php echo $this->language ?>" dir="<?php echo $this->direction ?>">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <jdoc:include type="head" />
</head>
<body>
    <div class="container-fluid">
        <div id="head">
            <div class="row">
                <div class="col-lg-8"></div>
                <div id="username" class="col-lg-1"></div>
                <div id="sign-up" class="col-lg-1">
                    <?php if ($user->guest): ?>
                    <jdoc:include type="modules" name="position-2" />
                    <?php else: ?>
                    <?php echo $user->name ?>
                    <jdoc:include type="modules" name="position-2" />
                    <?php endif; ?>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-3">Android SDK</div>
            <div class="col-lg-3">iOS SDK</div>
            <div class="col-lg-3">Getting Start</div>
            <div class="col-lg-3">Sign Up</div>
        </div>
        <div class="row">
            <div class="col-lg-4">Feature Highlight</div>
            <div class="col-lg-4">Feature Highlight</div>
            <div class="col-lg-4">Feature Highlight</div>
        </div>
        <div class="row">
            <div class="col-lg-4">
                <ul>
                    <li>Products</li>
                    <li>Analytics</li>
                </ul>
            </div>
            <div class="col-lg-4">
                <ul>
                    <li>About Us</li>
                    <li>Contact Us</li>
                    <li>Join Us</li>
                </ul>
            </div>
            <div class="col-lg-4">
                <ul>
                    <li>Documents</li>
                    <li>Getting Start</li>
                    <li>User Guide</li>
                </ul>
            </div>
        </div>
    </div>
</body>
</html>
